package LeetCode.LC867;

/**
 * @author corn
 * @create 2020-10-28-23:03
 */
public class Solution {
    public int[][] transpose(int[][] A) {
        if(A.length == 0 || A == null){
            return null;
        }
        int row = A[0].length;//行
        int col = A.length;//列
        int[][] B = new int[row][col];
        for(int i = 0; i < col ; i++){
            for(int j = 0; j < row; j++){
                B[j][i] = A[i][j];
            }
        }
        return B;
    }
}
